<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>

  <body>
    <div class="outer" id="outer">
      <ul class="list list-1">
        <li name="li-item" class="item item2 item3">list-one</li>
        <li class="item">list-two</li>
        <li class="item">list-three</li>
      </ul>
    </div>
    <div class="outer2" id="outer"></div>
    <div id="foo\bar">ccc</div>

    <script>
      var log = console.log;

      var outerEl = document.getElementById("outer");
      // Element也有此方法
      var items2 = outerEl.querySelector("li");
      // 你必须将它转义两次（一次是为 JavaScript 字符串转义，另一次是为 querySelector 转义）
      var items3 = document.querySelector("#foo\\\\bar");

      // 不满足css选择器，异常
      var items4 = document.querySelector("sdasd:::sdsd");
    </script>
  </body>
</html>
